package com.ghpt.service.impl;
import com.ghpt.mapper.ShuiDianMapper;
import com.ghpt.pojo.ShuiDian;
import com.ghpt.service.ShuiDianService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ShuiDianServiceImpl implements ShuiDianService {
    @Autowired
    private ShuiDianMapper shuiDianMapper;

    @Override
    public ShuiDian findShuiDianById(Long id) {
        if (id != null) {
            return shuiDianMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(ShuiDian shuiDian) {
        return shuiDianMapper.updateById(shuiDian);//更新成功为1否则为0
    }
}
